Optional insertion for Subjects and Professors

Added professor's functional