refactor, exception "handling"