Hmm I think we should use generics here, but more comments to come later