code to match shapes to twofishes respones