added Nested Loop, accessor method, and adjusted variables