Removed frivolous codes & redefined winOverlap