updated top code to reflect new set_position method