Added 2 functions and their tests