generics usage fixed
Function API updated