bug fixes and new functionality added