use libbuffer