Added option for setting the shortened length