cleaned up part 1