renamed attributes variable to data