Added optional params for the list function