switched back to a inline function for tiling cases.
edited to match new names