added support for try-except