basic timer implementation

using setinterval and settimeout