solves state space search problems