change output to uint32 everywhere