changed range values to n