server code is now fully commented