a buffering implemented but not working!