final version - third pass added