adding function addVariable