removed dead code and enabled back clipping