switched to use blocks rather than exceptions

also there were too many nested Routines