modified crockford constructor pattern