clean code for tiles