added variable for the server, so it doesn't just work on localhost