added configuration of the border width and color, updated example code, added test cases for the selection code