added stat calculations