rows functionality moved to connection