[JRO] refactor a bit