adding slugs and testing to the pages resource