added changes based on PR-comments