v2.1 implement basic SWP using buf_window array