added balance tracking to history command