alpha algorithm to find hands and head