Updated move function to call handle_collisions function