wrote some documentation and fixed a bug at querying devices by did and protocol