removed main() & added hasWord()