clean up logic per pull request 84