Bilateral trade flows, the gravity equation, and functional form