server.java added functions