rewritten for better integration with other libraries and composer
the url definition is more flexible now