fixing assignment/comparison mix up