Agreed - changed this code so it is now more flexible.