adding try/exception methods for better testing.