convenience functions - accept array OR hash