switch to prototype constructor