converted timer experiment into directive