Restructured and added variables