added exception handling ...