new functionality and bug fix