Updated script to account for single and double quotes