Added code to strip the extra spaces