add boundary function, still exist bug in closing function
add anwser