added statistics computation