updating based on comments from Ivan in PR