added validate edit to scan