add license
more working
tweaks and fix
mostly working now