         }
     }
     
-    private func setuphand(hand: UIView, lengthRatio: CGFloat, thickness: CGFloat, offset: CGFloat) {
-        hand.layer.transform = CATransform3DIdentity
+    private func setupHand(hand: UIView, lengthRatio: CGFloat, thickness: CGFloat, offset: CGFloat) {
+        let handLength = (sideLength/2) * lengthRatio
         
-        let handLength = (sideLength/2) * lengthRatio
-
         let anchorX: CGFloat = 0.5
         let anchorY: CGFloat = 1.0 - (offset/handLength)
         hand.layer.anchorPoint = CGPoint(x: anchorX, y: anchorY)

        hand.frame = CGRectMake(centerInParent.x-(thickness/2), centerInParent.y - handLength + offset, thickness, handLength)
    }
    
    private func setTime(#h: Int, m: Int, s: Int) {
        
        // Put everything in seconds to have ratios
        let hoursInSeconds = (h%12)*3600
        let minutesInSeconds = (m%60)*60
        let secondsInSeconds = (s%60)
        
        let hoursRatio = CGFloat(hoursInSeconds + minutesInSeconds + secondsInSeconds) / 43200.0
        let minutesRatio = CGFloat(minutesInSeconds + secondsInSeconds) / 3600.0
        let secondsRatio = CGFloat(secondsInSeconds) / 60.0
        
        handSeconds.transform = CGAffineTransformMakeRotation(CGFloat(2*M_PI)*secondsRatio)
        handMinutes.transform = CGAffineTransformMakeRotation(CGFloat(2*M_PI)*minutesRatio)
        handHours.transform = CGAffineTransformMakeRotation(CGFloat(2*M_PI)*hoursRatio)
    }

}

        sideLength = min(self.bounds.size.width, self.bounds.size.height)
        
        // Reset all transforms
        setupHand(handHours, lengthRatio: hoursLength, thickness: hoursThickness, offset: hoursOffset)
        setupHand(handMinutes, lengthRatio: minutesLength, thickness: minutesThickness, offset: minutesOffset)
        setupHand(handSeconds, lengthRatio: secondsLength, thickness: secondsThickness, offset: secondsOffset)
        
        handHours.backgroundColor = hoursColor
        handMinutes.backgroundColor = minutesColor
