refactoring a bit endpoints to facilitate jmx logic