now the code fits the server