remove the magic number when call getComponent function