Used setInterval method instead of time update event