Seperated functionality of parts 1a and 2 so now we can test both