     // MARK: - private functions
 
     private func touchDown(atPoint pos : CGPoint) {
-        targetXPostion = pos.x
+        target = pos.x
         print("Down")
-        print("new target position X: \(targetXPostion)")
+        print("new target position X: \(target)")
     }
 
     private func touchMoved(toPoint pos : CGPoint) {
-        targetXPostion = pos.x
+        target = pos.x
         print("Moved")
-        print("new target position X: \(targetXPostion)")
+        print("new target position X: \(target)")
     }
 
     private func touchUp(atPoint pos : CGPoint) {
-        targetXPostion = pos.x
+        target = pos.x
         print("Up")
-        print("new target position X: \(targetXPostion)")
+        print("new target position X: \(target)")
+
+        if personNode.hasActions() {
+            personNode.removeAllActions()
+        }
 
         var turnInAction = SKAction.getTurnInLeftAction()
-        if personNode.position.x < targetXPostion {
+        if personNode.position.x < target {
             turnInAction = SKAction.getTurnInRightAction()
         }
         
         personNode.run(turnInAction) {
-            self.walkAction(to: self.targetXPostion)
+            self.walkAction(to: self.target)
         }
     }
 

    private let personTexture: SKTexture = SKTexture(image: #imageLiteral(resourceName: "idle_1"))
    private var personNode: SKSpriteNode!
    
    private var targetXPostion: CGFloat!
    
    private var spinnyNode: SKShapeNode?
    private var ground: SKSpriteNode?

    private var oneStepLength: CGFloat = 0

        self.addChild(personNode)

        oneStepLength = personTexture.size().width/2
    }

    override func mouseDown(with event: NSEvent) {
        self.touchDown(atPoint: event.location(in: self))
    }
