correctly use prototypical inheritance