added functions and tests for uniqueness of attribute