more progress on #1314 (working!)