code review changes for MainActivity up to isInRange