use the slug to replace the id method