Added two functions and fixed a typo