part 3 logically complete, needs testing