[TASK]add out-of-border logic, part1