replaced operators with anonymous functions