refactored
fixed timestamp bug while updating to server
Merge pull request #4 from aszharite/master

refactored and fixed a bug