refactors slug