added functions for converting and flippig our tile matrix