moved similarity solution to tests