accept model url as function to get id for localstorage