add some interface and fix some problems