refactor update_rc into shell function