refactoring and moved convertTimestamp code into a filter