Try to lower use of loops