Updating working code.