Code for MPO TP 7