Refactor for playground