fixed typo (create gN redundantly) now runs but gives wrong result for passive