defining if numeric
divide by 0 message
corrected error statements to state variable