Fixed the error caused by incorrect "boder" pass value. And added a simple unit test to verify correctness.