extract slug method to module