fixing dictionary accessing