Change to use reference conn instead of client.connection