First try at scala sorting