tiles refactor