Metrics calculation added.