added de-duplication and tests to pre_account.