added newline to log
changed time arithmetic