better conversion from sofapython objects