improved letter recogniser implementation