use unsafe.Pointer and custom type with getters