fixing prototypal inheritance