added first version  of ratio
bug fix