code for setting tiles automatically, not yet there.