assignment 3 first 4 exercises