add algorithm chap11 & 12