updated fn name and updated exception under else part