adds backtracking with runtime errors