use array objects
remove unsafe range function
use safe _range function
use safe _range function