new functions in mwf; +little changes