change calculate seconds for milliseconds