changed history to also return the balance