q&d implementation of url parsing