Update the charater algorithm