add _cmp to function output and also another function getselectvar