vars being properly added (code lines were in wrong logic block)