simple solver in terms of xmass