added custom error types, but not yet using them
fixed conflicts