Functions to manage solver