added Brian's changes