fixed obvious bugs, iterator remains