added timer functionality