change approach to subroles
bugfixes
add docs and tests