solved remaining tasks of ex2