corrected broken output