better answer for distinct