New function: scaled()
New function: find_index()