made it work with ascii tables
improved performance, fixed uppercase/lowercase issue