add some genericized convenience tools