Small modification to dict program