check for NULLs in some functions
handle rotation and coloring in render surface functions