removed duplication and sorted