Fix typo and add functions