adding rank scaling script