added check startFrom >= rows