revised the test of bounded buffer