add generics, and simplified camelcase transformation