fixed ratio and added some comments