added uniqueness check