Added generics to Handler