added exercises and solution for type classes