integrating michaels code