merge from Tom (cow2)