Updated to work with server