cleaned up part 2 a bit