removing unneccessary for loop