Fixed typo and function output