separate preconditions into separate files for precondition checking and exceptions
add iterable interface