change Tile into case class