worked on TODOs: Exception handling