Slightly changed to fit new client configuration