corrected zero-based bugs in ctmc.rb
removed perf