beginning of program which algorithmically traverses through html code and creates an api