added constructor to client