improved structs and fptrs'