   func update() {
     
     
-    Animera.runWithDuration(self.duration) { progress, reversedProgress, isFinished in
+    Animera.runWithDuration(self.duration) { progress, reversedProgress, isFinished, action in
       let timedPercentage = self.timingFunctionHandler(progress)
 //      self.box.center.x = (self.newCenter!.x * timedPercentage) + (self.box.center.x * (1.0-timedPercentage))
 //      self.box.center.y =  (self.newCenter!.y * timedPercentage) + (self.box.center.y * (1.0-timedPercentage))
 
-      self.box.center.x = (self.newCenter!.x * timedPercentage) + (self.box.center.x * (1.0-timedPercentage))
-      self.box.center.y =  (self.newCenter!.y * timedPercentage) + (self.box.center.y * (1.0-timedPercentage))
+      self.box.center.x = action(identifier: "centerX", fromValue: self.box.center.x, toValue: self.newCenter!.x)
+      self.box.center.y =  action(identifier: "centerY", fromValue: self.box.center.y, toValue: self.newCenter!.y)
 
 //      self.box.bounds.size.width = (self.newSize!.width * timedPercentage) + (self.previousSize!.width * (1.0-timedPercentage))
 //      self.box.bounds.size.height =  (self.newSize!.height * timedPercentage) + (self.previousSize!.height * (1.0-timedPercentage))

import UIKit

import QuartzCore
typealias DisplayLinkProgressHandler = (progress:Double, reversedProgress:Double, isFinished:Bool) -> Void

class __AnimeraInternalWrapper : NSObject {
  let handler:DisplayLinkProgressHandler
  let duration:NSTimeInterval = 0
  let startTime:NSTimeInterval
  init(duration:NSTimeInterval, handler:DisplayLinkProgressHandler) {
    self.duration = duration
    self.handler = handler
    self.startTime = CACurrentMediaTime()
  }
  
  func update(displayLink:CADisplayLink) {

    let currentDuration = displayLink.timestamp - self.startTime
    println(currentDuration)
    if(currentDuration >= self.duration) {
      self.progress = 1.0
      self.handler!(progress: self.progress, reversedProgress: 0, isFinished:true, action:self.action!)
      displayLink.invalidate()
      __AnimeraInternalManager.map.removeValueForKey(displayLink)
    }
    else {
      let percentage = currentDuration/self.duration
      self.progress = percentage
      let reversePercentage = (1.0-percentage)
      self.handler!(progress: percentage, reversedProgress: reversePercentage, isFinished:false, action:self.action!)
      
    }
    
