fixed typo and more function