update to new theta.json syntax
fix bug in type detection