server handles all relevant conditions