rewrite interface code