createMember function