some changes from kupol - 5 pullrequests