changed all api commands to rpc command, rpc client handles now api commands