rafactored. timer not firing properly