added snippet for automatic rows