move hash function to url object