added save to server functionality. error handling is pretty rough at that point...