move size calculation into interpreter