mdp sample implementation