finished range checking