move "ratio" class into own header and source file