2.0 port

fix for the most current version for the api  - measurementFactory change