looping the functions