updated version of mpd.class.php