functions to get and verify user agents