finished all functionality, before timestamp difference bug fix