prototype in action, replacing methods in the constructor