Change getVertex() from member of paley to local function