Improve state provider