extracts slug code to module