Added second answer for ex3