States updating fom UI