updated overlap. working in debug mode