added scale function

#todo: scale logic