Amended dictionary loop