added more looping functions