Refactor existing code
convert seconds to milliseconds