modified five questions program to use hashes instead of an array