A much better aabb transformation method written