moure code(ugh...)
changes to use udt.. still needs a few fixes but basic ready3
more stuff.