check boundary & drawing boundary & merge