some changes with skeleton algorithm