added timer (very weird implementation, but works); resets proving to be
difficult