$master_account was not defined added global variable to function.