version 1.1
added apprioprate organization of pir buffer