refactor main TCPCLA API on index.js