exceptions added, comments added