fixed problematic get_docs func with a list return alternative