Rewritten using constructor prototype hybrid