generic class exercise updated