updated the addnewmembership function to fill the fields as required. 

To test