using model api which is much better. thanks stefan- from #swig :)