revamped rendering code (now it's easier to use) ->now  handles all tiles