added ability to handle relative urls