Minor changes in salt and pepper algorithm