moveToPoint logic added