assigned main variables for equation and validated user input