New version, compleetly changed transpose function to work with tab delimited input