added solve and trace