adjusted parse_url function to also work with 0 values
and added test