Added setGoalState