add AddVar function for action