working on bit plane pre-processing