refactor to use slugs for URLs