1.4.2 - Added sorting function