Use struct to replace vector