some changes pursuant to #297