add expcetion check