move dispose to prototype