first version of tile algorythm
no ideas