amended script to include unique class ids