in the process of adding exception handling