added a generic 'solve
' function to make things easier for others