added week 3 algoritms