added some changes from mbp