adding uniqueness from If to Main