character isolation; better treshold algorithm; bugfixes