Added Patm as argument to buffer.R