changed string compare to using .equals