added a loop code