Updating the tool logic