more intelligent way to determine correct execution