use refs to edit sub-components