initial implemntation of ex 5.