add toArray
rewrite interfaces to let map become another iterator
minor