changed string comparisons from '==' to '.equals'