properly dealing with tab character