Add autoscale

Add autoscale feaute :) It should works but tests needed.