moved server updates to its own js file