Added global time variable