Check

Check algorithm