reconfigured exceptions and fixed build