Implemented readBuffer method