converted != to equals instead of !...equals