added more model classes
implemented detailed error handling