gen acc for mem var