updated to work with latest R/modules/xcode - kjolley