modify function, and remake md