play refactor