added static version of getFields