made backwards algorithm