rewrite the interface using kv language