Algorithm outline