if statememnt works now, but not outputting the info i want