bugfix - dict.values() is not ordered, changed to access by key