figured it out i combined the code into one loop