some new functionality and fixes