added time.h, to provide the system time