First idea for setVariable function