corrected script for transition_ratio