added more functions to M api, renaming