removed unnecessary code

check the addObjectAt function...