removed useless loop