added max rows and data