outputing correctly