modified print statements to check for ansi