tested, working

- several fixes