Finished implelmenting the goal base finder