updated to use types.h