add some helper types and functions