lots of code! much more solid now...