improved autoarrange