refactored solve function to recieve cell objects
changed to continue while any progress has been made