Working part a and b (not C! that doesn't work yet).