Removed the possibility of failure from the solve function.