removed instance variable, added showError function