Got rid of two indentation levels in "solve" function