added prototypal inheritance