added eithert, refactored api to issue requests inside one connection, updated tests