playing around with object construction in js