moved methods from constructor to prototype.