refactored code a bit, tried to get chained operands to work but not quite there