add some prime related functions