abstract getVar logic