proto.js as an alternative to constructors