character recognition main program rough experimental draft)