add reverse and fix server bug