add server api and fix something