centralize error handling
renaming, error handling