Solution for ruler