added except handling to evaluating function