refactored sorting, moved student action refresh to index