fix bug in output of s command.
implement m command.