further improved AABB collision detection