ungolfed version and output