move size calculation into Clave