created general option parser; refactored iterator method to simplify method signatures
added random option for iterator and improved iterator testing