refactoring cube map