Switching commands to use for loop