cleaned code, got rid of extra pass to print results