porting aiming logic