jms refactor