fixed namespace error and changed variabledensity for scaling