making methods more general