Revert "removing generics"

This reverts commit 75e5d64086abba8d8a02e3d986bc9e9bb4d41e91.