test drawing boundary and fixed some bugs

Still need to be impovement