add name to test
some test refactoring
factor out the function checking the lines
add test using internalfunctions only