shorten input lengths