getting loop right
popen returns only once wanted value
adapted test to new output format
all tests pass :)