iterate list, algorthim