improved test with better output