rows and cols moved to constructor