moved let fun checkIndsGen to first let