1.refactor code.
2.add ratio menu