sorting out de-duping