small fixes
changed to abstract and fixed the membership calculation