added the option for ratio