plus some basic functions and types