Added completed server side code