error on date and metric need to rewwork