variable comparison corrected to use string comparison