litle refactoring + add support users headers and serverInfo parameter