sophia: implement space:len(), closes #510