merge #10 with cleaned up output