1. fixes problems in sequential naive GEP
2. outsources modular computation