removed warnings, added sys/time.h