adding server funtionality