streamlining and error-handling