updating the computer algorithm