change from encapsulation to prototype for plotaxis