Added code for dynamic timer