Dictionary query function dic_query is now working and has been tested