fixing typo and putting data to stdout