adding plug and play change to code