Trying to implement puzzle solve