use proper error classes