prepare code