Adding function to retrieve and list according to the arguments