using prototypal inheritance for ui objects