changed TAP sample to prime calculation