Implemented multi-pass cutting. fixes #3