added enemy border check