Change self - 1 to pred in method prime?