added the high level algorithm

added