add initial support for generic methods
Merge pull request #1 from SimonCropp/master

basic generics support