added mp functions