Adds functional measure function and tests