complete the func that commit alloc and drop commit(s)
TODO format output style