changed implementation of url methods so that they're more object oriented