change discussion from prototypes to class-like functions