added options
adding exception handling to main