working loop3