added wrapper functions and structs.