manually merge and improvement of pull request 3