reworked everything up to iterate