adjusted to allow for strings to be slugs, previously only worked with integers