refactoring server response and deprecated client code