applied fixes after pull request comments