got rid of stupid extra for loop