added unique_by and unit test plus unit test for common