refactor teachers show action