added info to loop, change timestamp to int, declared extern timestamp in main.cpp for use