refactoring of timestamp