refactor conversion method, add timestamp type, minor fix