reworked break from java to c. vast time improvements