function i wrote to generate a breadcrumb until I found other alternatives.