replace Cardinal with UInt32 for more clarity