re-implement "JWR changes""

This reverts commit 3189f9badccd604b35a6bcdd88bfddf6fc6ecc4a.