refactored elements on pages from static to dynamically generated