final version , fixed movement