updated with initial named element state check