moved methods from instance to prototype