centralize url logic