teacher management function