check boundary