scan iterator

made plenty if changes to incorporate scan iterator