Added some code for tiles