added lockin buffer reading