added Rachels code from class