dependency optimization sketch