some improvements after the round of monkey patching