rewrite of createTiles and some finetuning the recognition engine