Implementing Part 2 functions