some improvements for memberships calculatings