added iterator
fixed iterator
various improvements