fix url history
refactor url stuff