Added findTabByDoc util function