use op to calculate BAM_CIN and so on. decreased about 10% sensitivity but speed is no longer a problem