add generic methods homework

new homework