add constructor to prototype