make type signatures more general