added timestamp functionality
minor bug fixes and formatting issues