corrected and improved code surrounding the account_split