completed backtrack implementation

Not perfect but does find a solution often