updated version with dictionaries and GUI with images