updated accounting logic and corresponding simulate views, implemented python and ruby clients