Adding pseudoPrime and gain