ex1 done but not recursive