add inherit to utils
consolidate error type logic