replaced deprecated functions from Morpho