refactor generics section to use custom types
fix signatures
Merge pull request #19 from Raynos/generic-custom-type

refactor generics section to use custom types