refactor insert call, more account handling