works as both node/browserify module and naked js file in 'rectangles' namespace