states route refactored, having async issues