solved #35 by switching to left-hand comparison