separate interface method from client.js