applied changes from PR