added a for loop and scanf