implements students function in teacher model