cleaned up
implemented single, dual, series and parallel patch modes