making code work for distributed and central servers alike