now validates uniqueness of uid, removed generate_uid method