iterate on tempset, this is a alternative version