Implementation of modifyAccountData function