hide some of the primitive stuff behind a nicer interface