solidified algorithm