J: working version, in the process of steamlining poarization and baseline reading