Used distinct() function to get read of the duplicated in the queries