Added sorting in tables