optimize BufferPush & add test cases