now a library + much better url retriving, also http headers added