modification based on Tom's comments