second attempt at using timer