Preparation of polymer–clay nanocomposites and their properties