changed overlap check