fixed failing test
added docu and a test
refactored