change some code for new interface