Added max-rows enhancement