fix compile warning issue
add algorithm package