Added sorting operations
Tests for sorting