[mod]fix bugs and add api