added code that update membership accordingly.