have server passed as parameter in controller