Added template function to select all items