first working version of recognize-hilbert