Added solvable function, also made an output function.