playn with refactoring