solve and trace