changed how input works using bit masks instead of a hash table