clone of m2tklib.