replaced var compare with inline fns (part 1)
replaced var compare with inline fns (part 2)