part of #955
part of #955