Added optional clipping function
Merge pull request #2 from Robbie1977/AddingClipping

Added optional clipping function