progress on algorithm