circular buffer
- added many unit tests;
- corrected many bugs