loops optimization complite