implemented timer using angular's