added overlap calculation