adding server side logic