refactor the code to expose a full measures provider