reworking the methods as prototypes