update with more general types
problem 48