added loop variant