equality test moved
functions as objects pattern explained