generator basically working, some strange behavior remains