remove bugs with variables and parsing input for errors