adding exception handling

updates