added some funcs, modified mscale