Solving unit rate problem