finished implementing stateless variable reconstruction (have not tested yet)