renamed state field to data