now handles double variables