Time function added