added documentation and get_invalid_url