state is not working here