added more flexible time setting; changed superclass to UIControl for better interactivity