added scale sample functionality