added Frontier Finder
fixing pointer
converted a class into a function
cleaning code