Added 3 and 4

I need to double check 3 algorithm