Simple Flow Chart Algorithm