added the beginning of pubgen