refactor to json-timeserver.js