moved normal code to NormalBuffer.cpp