add a module for generic functions, and use overloading there. curl is code-wide replaced by this