merged latest from Greg