code cleanup: move draw to separate function
add different scaling types