refactored to use iterator to print static data and inputs