working sanitizing code