preparation code