getAdjustedStock
change to rect
Refactor of view code