move imports to beginning of the file
add a test for proxy detection