added slug function, it's still pretty duurty