Prepare updateSubjects() function.