updated get leader code for redis