simplify slug logic