added funcs to serverStuff.R