Metering

Added metering (but didn't test it).