more algorithm work#2