dropped use of database in favor of large lists; changed for use with python 3.x; working draft added