refactor exceptions and argument passing to be more easily used by others
refactor exceptions and argument passing to be more easily used by others