removed old code
code cleanup
fixed scale variable
code cleanup
code cleanup