finished solve method
feeble attempts to implement solveSing