deleted old non-iterating code