fucntionspec for validatePuzzle done