from ex2 without my ex3 implementation