modified intro to objects in js