More stable version

Changed HashMap to Sorted Vector