move buffer to a package