more performance, bug fixes