some new features and bug fixes