implemented the addbuiltinmetrics call in state