ex3.12; working on ex3.13