this is now clean of print statements and works on 1a-d, 2