refactor ms to s