solved buffering problem