refactored students action on teachers controller
Refactored further