add constructor with fetchSize option to templates