added locality description logic