state and data class updated